<template>
		<!-- number/lianjia?num=1000&max=10&flag=1 -->
	<view class="uni-back">
			<numInput :title="tableData"></numInput>
	</view>
</template>

<script>
	import {shiyineilianjia} from '../../../api/work/study.js'
	export default {
		data() {
			return {
				num: 1,
				max: 5,
				flag:0,
				tableData:[
					{title:'',
					result:'',
					userResult:''
					}
				],
				timer:{},
			};
		},
		computed: {  
		  status() {  //  计算属性
		    return this.$store.state.tableStatus; //  Vuex 中定义的属性
		  }
		},
		watch:{
		  status() {
		    this.next();  //   需要调用的方法
		  }
		},
		mounted() {
			this.settimer()
		},
		methods:{
			next(){
					this.settimer()
			},
			settimer(){
				this.jiafa()
			},
			jiafa(){
				shiyineilianjia(this.num,this.max,this.flag).then(resp=>{
					console.log(resp.data)
					this.tableData = resp.data
				})
			},

		}
	}
</script>

<style lang="scss">

</style>
